package at.com.vn.chess.servlet;

import java.io.IOException;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Simple demonstration for an Applet <-> Servlet communication.
 */
public class ChatPublicServlet extends ChatServletBase {
	private static final long serialVersionUID = 1L;

	ServletContext context;

	// doGet() returns the next message. It blocks until there is one.
	public void doGet(HttpServletRequest req, HttpServletResponse res)
			throws ServletException, IOException {
		getChat(req, res);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		
		logger.info( "begin a public chat session" );

		// Call service
		postChat(request, response);
	}
}
